<include file="public@header"/>
<link href="__TMPL__/public/assets/themes/{:cmf_get_admin_style()}/house.css" rel="stylesheet">
</head>
<body>
  <div class="house-parameter-edit">
    <form action="editForm.html" class="js-ajax-form" method="post" name="editForm">
      <table class="table table-hover table-bordered">
        <tr>
          <td width="120">选择参数类型</td>
          <td>
            <select class="form-control" name="catid">
              <option value="0">请选择</option>
              <foreach name="categorys" item="cat">
                <?php if ($cat['id'] == $data['catid']) { ?>
                  <option value="{$cat.id}" selected="selected">{$cat.name}</option>
                <?php } else { ?>
                  <option value="{$cat.id}" >{$cat.name}</option>
                <?php } ?>
              </foreach>
            </select>
          </td>
        </tr>
        <tr>
          <td>参数值</td>
          <td><input class="form-control" type="text" name="name" value="{$data.name}"></td>
        </tr>
      </table>
      <!-- <input type="submit" class="btn btn-primary js-ajax-submit" name="submit" value="添加"> -->
    </form>
  </div>

  <script type="text/javascript">
    function getForm() {
      var formData = {
        catid: editForm.catid.value,
        name: editForm.name.value
      }

      var url = '{:url("editForm", array("id" => $data.id))}'
      return {
        url: url,
        formData: formData
      }
    }
  </script>
  <script src="__STATIC__/js/admin.js"></script>
</body>
</html>
